package com.kust.smarthome.web.controller;


import com.kust.smarthome.web.model.Product;
import com.kust.smarthome.web.service.IProductService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author iAuzre
 * @since 2021-06-28
 */
@RestController
@RequestMapping("/product")
@Api(value = "产品信息相关操作", tags = {"product-tag"})
public class ProductController {

    @Resource
    private IProductService productService;

    @GetMapping("")
    @ApiOperation(value = "查询所有产品信息")
    public List<Product> list() {
        return productService.list();
    }

}
